ALT_QT_INSTALL_LIBS = $$system($$QMAKE_QMAKE -query QT_INSTALL_LIBS)
ALT_QT_INSTALL_IMPORTS = $$system($$QMAKE_QMAKE -query QT_INSTALL_IMPORTS)
!contains($$_PRO_FILE_,test.pro): PROJECT_MODE=1
!contains(ALT_QT_INSTALL_LIBS,$$[QT_INSTALL_LIBS]): message(Drainbread qmake says $$ALT_QT_INSTALL_LIBS is $$[QT_INSTALL_LIBS])
!contains(ALT_QT_INSTALL_IMPORTS,$$[QT_INSTALL_IMPORTS]): message(Drainbread qmake says $$ALT_QT_INSTALL_IMPORTS is $$[QT_INSTALL_IMPORTS])
exists($$QMAKE_INCDIR_QT"/../qmsystem2/qmkeys.h"):!contains(MEEGO_EDITION,harmattan): {
  MEEGO_VERSION_MAJOR     = 1
  MEEGO_VERSION_MINOR     = 2
  MEEGO_VERSION_PATCH     = 0
  MEEGO_EDITION           = harmattan
  DEFINES += MEEGO_EDITION_HARMATTAN
}
contains(MEEGO_EDITION,harmattan): OS=Meego 1.2 Harmattan
symbian {
	contains(SYMBIAN_VERSION,Symbian3) {
		OS=Symbian^3
	} else {
		OS=Symbian $$SYMBIAN_VERSION ($$S60_VERSION)
	}
}
maemo5: OS=Maemo5
win32: OS=Windows
macx: OS=MacOS X
simulator: OS=Simulator
isEmpty(OS): linux-g++: OS=Linux

message(TARGET:$$OS) # note: QtSDKInfo uses TARGET: as the first line to identify a successful run - don't put anything before this if you use it from QtSDKInfo !
message(QT:$$[QT_VERSION])
#CONFIG += mobility
load(mobilityconfig)                                                                                                                                                         
isEmpty(MOBILITY_VERSION) : exists( $$ALT_QT_INSTALL_LIBS"/libQtContact*" ) {

	MOBILITY_VERSION=1.0.2
	MOBILITY_MAJOR_VERSION=1
	MOBILITY_MINOR_VERSION=0
	MOBILITY_PATCH_VERSION=2
}
!isEmpty(MOBILITY_VERSION): !maemo5: message(MOBILITY:$$MOBILITY_VERSION)
!isEmpty(PROJECT_MODE): !contains(CONFIG,mobility): message(QtMobility support disabled: no CONFIG += mobility)
maemo5 { # check community builds of mobility
        load(mobilityconfig11)
        contains(MOBILITY_VERSION,1.1.) : SHADOW_MOBILITY = $$MOBILITY_VERSION
        contains(MOBILITY_VERSION,1.2.) : SHADOW_MOBILITY += $$MOBILITY_VERSION
        !isEmpty(SHADOW_MOBILITY) {
            message(MOBILITY:$$MOBILITY_VERSION ($$SHADOW_VERSION))
        } else {
            message(MOBILITY:$$MOBILITY_VERSION)
        }
}
win32 { 
	ECHOCMD=type
} else { 
	ECHOCMD=cat 
}

exists ($$ALT_QT_INSTALL_IMPORTS"/com/nokia/meego/qmldir") { 
	QMLDIR=$$system($$ECHOCMD $$ALT_QT_INSTALL_IMPORTS"/com/nokia/meego/qmldir" )
#        message($$QMLDIR)
        contains(QMLDIR,1.0): QQCVER=1.0
        message(COMPONENTS:MeeGo 1.2 Harmattan (com.nokia.meego $$QQCVER))
}
exists ($$ALT_QT_INSTALL_IMPORTS"/com/nokia/symbian/qmldir") {
        QMLDIR=$$system($$ECHOCMD $$ALT_QT_INSTALL_IMPORTS"/com/nokia/symbian/qmldir" )
#        message($$QMLDIR)
        contains(QMLDIR,1.0): QQCVER=1.0
        !isEmpty(PROJECT_MODE): symbian3: !contains(CONFIG,qt-components): message(QtQuick components for Symbian not requested: no CONFIG += qt-components)
        message(COMPONENTS:Symbian (com.nokia.symbian $$QQCVER))
}

message(QMAKE:$$QMAKE_QMAKE)
message(COMPILER:$$QMAKE_CC)
message(HOST:$$QMAKE_HOST.os $$QMAKE_HOST.version $$QMAKE_HOST.version_string $$QMAKE_HOST.arch)
#message(SCOPE:$$TARGET_PLATFORM)
